import { BasicLayout, BlankLayout } from '../layouts'
/**
 * 基础路由
 * @meta { 
    columntype: 与后台数据Column对应的栏菜单类型，用于过滤显示
  }
 */
export const constantRouterMap = [
  {
    path: '/',
    name: 'index',
    component: BasicLayout,
    redirect: '/blog',
    meta: { title: 'NowaBlog', langid: 1, columntype: 3 },
    children: [
      {
        path: '/blog',
        name: 'bloghome',
        component: () => import('@/views/Home'),
        meta: { title: '首页', langid: 1, columntype: 3, mapurl: '/zh/blog/homepage' },
      },     
      {
        path: '/list/:columnid',
        name: 'bloglist',
        component: () => import('@/views/list/BlogList'),
        meta: { title: '博客列表', langid: 1, columntype: 3, mapurl: '' },
      },       
      {
        path: '/:columnid/detail/:blogid',
        name: 'blogdetail',
        component: () => import('@/views/detail/BlogDetail'),
        meta: { title: '博客详情页', langid: 1, columntype: 3, mapurl: '' },
      },       
    ]
  },
  // Exception
  {
    path: '/exception',
    name: 'exception',
    component: BlankLayout,
    redirect: '/exception/404',
    meta: { title: '404', langid: 1, columntype: 3 },
    children: [
      {
        path: '/exception/404',
        name: 'Exception404',
        meta: { title: '404', langid: 1, columntype: 3 },
        component: () => import(/* webpackChunkName: "exception" */ '@/views/exception/404')
      },
    ]
  },
  {
    path: '*', redirect: '/exception/404'
  }
]